home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / answers / graphics / gnuplot-faq < prev    next >
Encoding:
Internet Message Format  |  1993-07-04  |  23.0 KB

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!xlink.net!rz.uni-karlsruhe.de!fg70.rz.uni-karlsruhe.de!ig25
  2. From: ig25@fg70.rz.uni-karlsruhe.de (Thomas Koenig)
  3. Newsgroups: comp.graphics.gnuplot,comp.answers,news.answers
  4. Subject: comp.graphics.gnuplot FAQ (Frequent Answered Questions)
  5. Supersedes: <comp-graphics-gnuplot-faq_740304033@fg70.rz.uni-karlsruhe.de>
  6. Followup-To: comp.graphics.gnuplot
  7. Date: 4 Jul 1993 15:43:35 GMT
  8. Organization: University of Karlsruhe, Germany
  9. Lines: 573
  10. Approved: news-answers-request@MIT.Edu
  11. Expires: 1 Aug 1993 15:43:24 GMT
  12. Message-ID: <comp-graphics-gnuplot-faq_741800604@fg70.rz.uni-karlsruhe.de>
  13. Reply-To: ig25@rz.uni-karlsruhe.de
  14. NNTP-Posting-Host: fg70.rz.uni-karlsruhe.de
  15. Mime-Version: 1.0
  16. Content-Type: text/plain; charset=iso-8859-1
  17. Content-Transfer-Encoding: 8bit
  18. Summary: This is the FAQ (Frequently Answered Questions) list of the
  19.      comp.graphics.gnuplot newsgroup, which discusses the
  20.          gnuplot program for plotting 2D - and 3D - graphs.
  21. Keywords: computer graphics, gnuplot
  22. Xref: senator-bedfellow.mit.edu comp.graphics.gnuplot:1617 comp.answers:1198 news.answers:10008
  23.  
  24. Archive-name: graphics/gnuplot-faq
  25. Version: $Header: comp-graphics-gnuplot,v 1.18 93/06/24 23:38:04 ig25 Exp $
  26.  
  27. This is the FAQ (Frequently Answered Questions) list of the
  28. comp.graphics.gnuplot newsgroup, which discusses the gnuplot program for
  29. plotting 2D - and 3D - graphs.
  30.  
  31. Most of the information in this document came from public discussion on
  32. comp.graphics.gnuplot; quotations are believed to be in the public
  33. domain.
  34.  
  35. Here's a list of the questions.  If you are looking for the answer for a
  36. specific question, look for the string Qx.x:  at the beginning of a line,
  37. with x.x being the question number.
  38.  
  39. Questions:
  40.  
  41. Section 0: Meta - Questions
  42. Q0.1: Where do I get this document?
  43. Q0.2: Where do I send comments about this document?
  44.  
  45. Section 1: General Information
  46. Q1.1: What is gnuplot?
  47. Q1.2: How did it come about and why is it called gnuplot?
  48. Q1.3: Does gnuplot have anything to do with the FSF and the GNU project?
  49. Q1.4: What does gnuplot offer?
  50. Q1.5: Is gnuplot suitable for batch processing?
  51. Q1.6: Can I run gnuplot on my computer?
  52.  
  53. Section 2: Setting it up
  54. Q2.1: What is the current version of gnuplot?
  55. Q2.2: Where can I get gnuplot?
  56. Q2.3: How do I get gnuplot to compile on my system?
  57. Q2.4: What documentation is there, and how do I get it?
  58.  
  59. Section 3: Working with it
  60. Q3.1: How do I get help?
  61. Q3.2: How do I print out my graphs?
  62. Q3.3: How do I include my graphs in <word processor>?
  63.  
  64. Section 4: Wanted features in gnuplot
  65. Q4.1: Does gnuplot have hidden line removal?
  66. Q4.2: Does gnuplot support boxes?
  67. Q4.3: Does gnuplot support multiple y-axes on a single plot?
  68. Q4.4: Can I put multiple plots on a single page?
  69. Q4.5: Can I put both data files and commands into a single file?
  70.  
  71. Section 5: Miscellaneous
  72. Q5.1: I've found a bug, what do I do?
  73. Q5.2: Can I use gnuplot routines for my own programs?
  74. Q5.3: What extensions have people made to gnuplot?  Where can I get them?
  75. Q5.4: Can I do heavy - duty data processing with gnuplot?
  76. Q5.5: I have ported gnuplot to another system, or patched it.  What do I do?
  77.  
  78. Section 6: Making life easier
  79. Q6.1: How do I plot two functions in non - overlapping regions?
  80. Q6.2: How do I run my data through a filter before plotting?
  81. Q6.3: How do I make it easier to use gnuplot with LaTeX?
  82. Q6.4: How do I save and restore my settings?
  83.  
  84. Section 7: Known Problems
  85.  
  86. Q7.1: Gnuplot is not plotting any points under X11!  How come?
  87. Q7.2: My isoline data generated by a FORTRAN program is not handled
  88.     correctly.  What can I do?
  89. Q7.3: Why does gnuplot ignore my very small numbers?
  90.  
  91. Section 8: Credits
  92.  
  93. Questions and Answers:
  94.  
  95. Section 0: Meta - Questions.
  96.  
  97. Q0.1: Where do I get this document?
  98.  
  99. This document is posted about once every two weeks to the newsgroups
  100. comp.graphics.gnuplot, comp.answers and news.answers.  Like many other
  101. FAQ's, it is available via anonymous ftp from rtfm.mit.edu [18.70.0.224]
  102. from the directory /pub/usenet/news.answers under the Archive-Name:  at
  103. the top of the article, graphics/gnuplot-faq, and from the directory
  104. /pub/usenet/comp/graphics/gnuplot, as well as via gopher from
  105. gopher.univ-lyon1.fr [134.214.100.25].
  106.  
  107. Q0.2: Where do I send comments about this document?
  108.  
  109. Send comments, suggestions etc. via e-mail to Thomas Koenig,
  110. ig25@rz.uni-karlsruhe.de or ig25@dkauni2.bitnet.
  111.  
  112. Section 1: General Information
  113.  
  114. Q1.1: What is gnuplot?
  115.  
  116. Gnuplot is a command-driven interactive function plotting program.  It
  117. can be used to plot functions and data points in both two- and three-
  118. dimensional plots in many different formats, and will accomodate many of
  119. the needs of today's scientists for graphic data representation.
  120. Gnuplot is copyrighted, but freely distributable; you don't have to pay
  121. for it.
  122.  
  123. Q1.2: How did it come about and why is it called gnuplot?
  124.  
  125. The authors of gnuplot are:
  126.  
  127. Thomas Williams, Colin Kelley, Russell Lang, Dave Kotz, John Campbell,
  128. Gershon Elber, Alexander Woo and many others.
  129.  
  130. The following quote comes from Thomas Williams:
  131.  
  132. I was taking a differential equation class and Colin was taking
  133. Electromagnetics, we both thought it'd be helpful to visualize the
  134. mathematics behind them.  We were both working as sys admin for an EE
  135. VLSI lab, so we had the graphics terminals and the time to do some
  136. coding.  The posting was better received than we expected, and prompted
  137. us to add some, albeit lame, support for file data.
  138.  
  139. Any reference to GNUplot is incorrect.  The real name of the program
  140. is "gnuplot".  You see people use "Gnuplot" quite a bit because many
  141. of us have an aversion to starting a sentence with a lower case
  142. letter, even in the case of proper nouns and titles.  Gnuplot is not
  143. related to the GNU project or the FSF in any but the most peripheral
  144. sense.  Our software was designed completely independently and the
  145. name "gnuplot" was actually a compromise.  I wanted to call it
  146. "llamaplot" and Colin wanted to call it "nplot."  We agreed that
  147. "newplot" was acceptable but, we then discovered that there was an
  148. absolutely ghastly pascal program of that name that the Computer
  149. Science Dept. occasionally used.  I decided that "gnuplot" would make
  150. a nice pun and after a fashion Colin agreed.
  151.  
  152. Q1.3: Does gnuplot have anything to do with the FSF and the GNU project?
  153.  
  154. No.  Gnuplot is not covered by the General Public License, either.
  155.  
  156. Q1.4: What does gnuplot offer?
  157.  
  158. - Plotting of two - dimensional functions and data points in many different
  159.   styles (points, lines, error bars)
  160. - plotting of three - dimensional data points and surfaces in many
  161.   different styles (contour plot, mesh).
  162. - support for complex arithmetic
  163. - self - defined functions
  164. - support for a large number of operating systems, graphics file formats
  165.   and devices
  166. - extensive on-line help
  167. - labels for title, axes, data points
  168. - command line editing and history on most platforms
  169.  
  170. Q1.5: Is gnuplot suitable for batch processing?
  171.  
  172. Yes.  You can read in files from the command line, or you can redirect
  173. your standard input to read from a file.  Both data and command files
  174. can be generated automatically, from data acquisition programs or
  175. whatever else you use.
  176.  
  177. Q1.6: Can I run gnuplot on my computer?
  178.  
  179. Gnuplot is available for a number of platforms.  These are:  UNIX (X11
  180. and NeXTSTEP), VAX/VMS, OS/2, MS-DOS, Amiga, MS-Windows, OS-9/68k and
  181. the Macintosh.  Modifications for NEC 8901 are said to exist (where?).
  182. A version for the Atari ST exists at atari.archive.umich.edu, but is
  183. unstable.
  184.  
  185. Section 2: Setting it up
  186.  
  187. Q2.1: What is the current version of gnuplot?
  188.  
  189. The current version of gnuplot is 3.4, patchlevel 4.
  190.  
  191. Q2.2: Where can I get gnuplot?
  192.  
  193. [This information may be dated, due to the release of gnuplot 3.4.
  194. Please report any inaccuracies, if you find them.  Ed.]
  195.  
  196. All of the later addresses refer to ftp sites.  Please note that it is
  197. preferable for you to use the symbolic name, rather than the IP address
  198. given in brackets, because that address is much more subject to change.
  199.  
  200. The official distribution site for the gnuplot source is dartmouth.edu
  201. [129.170.16.4], the file is called /pub/gnuplot/gnuplot.3.2.tar.Z.
  202. Official mirrors of that distribution are (for Australia)
  203. monu1.cc.monash.edu.au [130.194.1.101] and (for Europe) irisa.irisa.fr
  204. [131.254.2.3].  You can also get it from your friendly neighbourhood
  205. comp.sources.misc archive.
  206.  
  207. MS-DOS and MS-Windows binaries are available from oak.oakland.edu (North
  208. America) [141.210.10.117] as pub/msdos/plot/gpt34*.zip, garbo.uwasa.fi
  209. (Europe) [128.214.87.1] as /pc/plot/gpt34*.zip and archie.au (Australia)
  210. [139.130.4.6] as micros/pc/oak/plot/gpt34*.zip.  The files are:
  211. gpt34doc.zip, gpt34exe.zip, gpt34src.zip and gpt34win.zip.
  212.  
  213. OS/2 2.0 binaries are at ftp-os2.nmsu.edu [128.123.35.151], in
  214. /pub/os2/2.x/unix/gnu/gplt33b2.zip .
  215.  
  216. Amiga sources and binaries are available from ux1.cso.uiuc.edu
  217. [128.174.5.59] as /pub/amiga/fish/f7/ff701/gnuplot.lzh.
  218.  
  219. The NeXTSTEP front-end can be found at sonata.cc.purdue.edu and
  220. cs.orst.edu.
  221.  
  222. A version for OS-9/68K can be found at cabrales.cs.wisc.edu
  223. [128.105.36.20] as /pub/OSK/GRAPHICS/gnuplot32x.tar.Z; it includes both
  224. X-Windows and non - X-windows versions.
  225.  
  226. A version of gnuplot for the Macintosh is included in the gpcontrb
  227. file, or can be found at wuarchive.wustl.edu [128.252.135.4], in
  228. edu/math/mac/graphingAids, as MacGnuPlot3.2.sea.hqx and
  229. MacGnuPlotPackage3.2.sea.hqx.
  230.  
  231. People without ftp access can use an ftp-mail server; send mail to
  232. bitftp@pucc.bitnet (for BITNET only) or ftpmail@decwrl.dec.com with the
  233. word 'help' in the mail body for more information.
  234.  
  235. It is a good idea to look for a nearby ftp site when downloading things.
  236. You can use archie for this.  See if an archie client is installed at
  237. your system (by simply typing archie at the command prompt), or send
  238. mail to archie@sura.net with the word 'help' in both the subject line
  239. and the body of the mail.  However, be aware that the version you find
  240. at a near ftp site may well be out of date; check the last modification
  241. date and the number of bytes against the newest release at one of the
  242. official servers.
  243.  
  244. Q2.3: How do I get gnuplot to compile on my system?
  245.  
  246. As you would any other installation.  Read the files README and
  247. README.Install, edit the Makefile according to taste, and run make or
  248. whatever is suitable for your operating system.
  249.  
  250. If you get a complaint about a missing file libplot.a or something
  251. similar when building gnuplot for x11, remove -DUNIXPLOT from the
  252. TERMFLAGS= line, remove -lplot from the LIBS= line and run again.  If
  253. you are making x11 on a sun, type 'make x11_sun'.
  254.  
  255. Q2.4: What documentation is there, and how do I get it?
  256.  
  257. The documentation is included in the source distribution.  Look at the
  258. docs subdirectory, where you'll find
  259.  
  260.  - a unix man page, which says how to start gnuplot
  261.  - a help file, which also can be printed as a manual
  262.  - a tutorial on using gnuplot with LaTeX
  263.  - a quick reference summary sheet for TeX only
  264.  
  265. PostScript copies of the documentation can be ftp'd from dartmouth.edu,
  266. in pub/gnuplot, as manual.ps.Z and tutorial.ps.Z
  267.  
  268.  
  269. Section 3: Working with it
  270.  
  271. Q3.1: How do I get help?
  272.  
  273. Give the 'help' command at the initial prompt.  After that, keep
  274. looking through the keywords.  Good starting points are 'plot'
  275. and 'set'.
  276.  
  277. Read the manual, if you have it.
  278.  
  279. Ask your colleagues, the system administrator or the person who set
  280. up gnuplot.
  281.  
  282. Post a question to comp.graphics.gnuplot or send mail to the gatewayed
  283. mailing list info-gnuplot@dartmouth.edu.  If you want to subscribe to
  284. the mailing list, send mail to info-gnuplot-request@dartmouth.edu,
  285. but please don't do this if you can get comp.graphics.gnuplot directly.
  286. If you pose a question there, it is considered good form to solicit
  287. e-mail replies and post a summary.
  288.  
  289. Q3.2: How do I print out my graphs?
  290.  
  291. The kind of output produced is determined by the 'set terminal' command;
  292. for example, 'set terminal postscript' will produce the graph in
  293. PostScript format.  Output can be redirected using the 'set output'
  294. command.
  295.  
  296. As an example, the following prints out a graph of sin(x) on a UNIX
  297. machine running X - Windows.
  298.  
  299. gnuplot> plot [-6:6] sin(x)
  300. gnuplot> set terminal postscript
  301. Terminal type set to 'postscript'
  302. Options are 'landscape monochrome "Courier" 14'
  303. gnuplot> set output "sin.ps"
  304. gnuplot> replot
  305. gnuplot> set output                      # set output back to default
  306. gnuplot> set terminal x11                # ditto for terminal type
  307. gnuplot> ! lp -ops sin.ps                # print ps - File (site dependent)
  308. request id is lprint-3433 (standard input)
  309. lp: printed file sin.ps on fg20.rz.uni-karlsruhe.de (5068 Byte)
  310. !
  311. gnuplot>
  312.  
  313. Q3.3: How do I include my graphs in <word processor>?
  314.  
  315. Basically, you save your plot to a file in a format your word processor
  316. can understand (using "set term" and "set output", see above), and then
  317. you read in the plot from your word processor.
  318.  
  319. Details depend on the kind of word processor you use; use "set term" to
  320. get a list of available file formats.
  321.  
  322. Many word processors can use Encapsulated PostScript for graphs.  This
  323. can be generated by the 'set terminal postscript eps' command.  Most
  324. MS-DOS word processors understand HPGL (terminal type hpgl).
  325.  
  326. With TeX, it depends on what you use to print your dvi files.  If you
  327. use dvips or dvi2ps, you can use Encapsulated PostScript.  For
  328. emTeX (popular for MS-DOS), you can use emTeX, otherwise use the
  329. LaTeX terminal type, which generates a picture environment.
  330.  
  331. If nothing else helps, try using the pgm or ppm format and converting it
  332. to a bitmap format your favourite word processor can understand.  An
  333. invaluable tool for this is Jef Poskanzer's PBMPLUS package.
  334.  
  335.  
  336. Section 4:  Wanted features in gnuplot
  337.  
  338. Q4.1: Does gnuplot have hidden line removal?
  339.  
  340. Version 3.4 supports hidden line removal on all platforms except MS-DOS.
  341. If someone can solve the 64K DGROUP memory problem, it would support
  342. hidden line removal there as well.  Version 3.2 supports limited hidden line
  343. removal.
  344.  
  345. Q4.2: Does gnuplot support boxes?
  346.  
  347. Version 3.4 does.
  348.  
  349. Q4.3: Does gnuplot support multiple y-axes on a single plot?
  350.  
  351. No.
  352.  
  353. Q4.4: Can I put multiple plots on a single page?
  354.  
  355. Look at the rosendorf subdirectory in the gpcontrb distribution;
  356. if you are using postscript output, check out mpage, which can
  357. be ftp'd from
  358.  
  359. ftp.eng.umd.edu:pub/misc/mpage-2.tar.Z
  360.  
  361. Q4.5: Can I put both data files and commands into a single file?
  362.  
  363. Not easily.
  364.  
  365. If you run UNIX, you might consider using Fudgit, which can do it.
  366.  
  367.  
  368. Section 5:  Miscellaneous
  369.  
  370. Q5.1: I've found a bug, what do I do?
  371.  
  372. First, try to see whether it actually is a bug, or whether it is a feature
  373. which may be turned off by some obscure set - command.  If you have a
  374. fairly general sort of bug report, posting to comp.graphics.gnuplot is
  375. probably the way to go.  If you have investigated a problem in detail,
  376. especially if you have a context diff that fixes the problem, please
  377. e-email a report to bug-gnuplot@dartmouth.edu.  The bug-gnuplot list
  378. is for reporting and collecting bug fixes, the comp.graphics.gnuplot
  379. mailing list will be more help for finding work arounds or actually
  380. solving gnuplot related problems.  If you do send in a bug report, be
  381. sure and include the version of gnuplot (including patchlevel), terminal
  382. driver, operating system, an exact description of the bug and input
  383. which can reproduce the bug.  Also, any context diffs should be
  384. referenced against the latest official version of gnuplot if at all
  385. possible.
  386.  
  387. Q5.2: Can I use gnuplot routines for my own programs?
  388.  
  389. Yes.  John Campbell <jdc@nauvax.ucc.nau.edu> has written gplotlib, a
  390. version of gnuplot as C subroutines callable from a C program.  This is
  391. available as gplotlib.tar.Z on the machine ftp.nau.edu in the directory
  392. /pub/gplotlib.tar.Z.  It is also included in the gpcontrb distribution
  393. in the campbell subdirectory.
  394.  
  395. Q5.3: What extensions have people made to gnuplot?  Where can I get them?
  396.  
  397. [This is still hazy; please check this out and see wether it is correct.
  398. Ed.]
  399.  
  400. Extensions have been put into the file gpcontrb.tar.z, which will is
  401. available with the 3.4 release.  If you are lucky, you will be able to
  402. download it from:
  403.  
  404.     ftp.cygnus.com:~ftp/pub/incoming/gpcontrb.tar.z
  405.  
  406. That directory is not readable, but getting the file actually works.
  407. Note that it is 2.5 megabytes and compressed using gzip.  The gzip
  408. program is available from everywhere where you can find GNU software.
  409. The main distribution site is prep.ai.mit.edu [18.71.0.38], in the
  410. directory /pub/gnu.
  411.  
  412. For European users, gpcontrb is also available from 
  413.  
  414.     src.doc.ic.ac.uk:/pub/packages/gnuplot/gpcontrb.tar.Z
  415.  
  416. It contains the following subdirectories:
  417.  
  418. bigler subdirectory:
  419.     From: bigler@cicg-calcul.grenet.fr
  420.     Subject: Multiple plots from a FORTRAN program
  421. budelsky subdirectory:
  422.     From: budelsky@haegar.ikp.uni-koeln.de
  423.     Subject: This is the information file for porting GNUPLOT 3.2
  424.         to OS-9/68000
  425. byrne subdirectory:
  426.     From: "Margaret R. Byrne" <mrb2j@kelvin.seas.virginia.edu>
  427.     Subject: congp3d3 preprocessor to draw contour plots on
  428.         irregular regions.
  429. clark subdirectory:
  430.     From: Michael Clark <clarkmp@prony.Colorado.EDU>
  431.     Subject: data filtering: adds point_skip & point_offs
  432. clift subdirectory:
  433.     From: ssclift@neumann.uwaterloo.ca (Simon Clift)
  434.     Subject: Re: Running Gnuplot from FORTRAN, (and C)
  435. green subdirectory:
  436.     From: Roque Donizete de Oliveira <oliveria@engin.umich.edu>
  437.     Subject: Postscript greek symbols in gnuplot, new prologue
  438. hanna subdirectory:
  439.     From: gregor@kafka.saic.com (gregg hanna)
  440.     Subject: x11-library mode, gnulib_x11.[c,h], xlibtest.c,makefile.xlib
  441. klosowski subdirectory:
  442.     From:   Carsten Steger <stegerc@informatik.tu-muenchen.de>
  443.     Subject: New file "klein.dat"
  444.     From: przemek@rrdstrad.nist.gov (Przemek Klosowski)
  445.     Subject: calling GNUplot from Fortran
  446. kocaturk subdirectory:
  447.     From: mustafa@seas.smu.edu (Mustafa Kocaturk)
  448.     Subject: Histograms in Gnuplot
  449. richardson subdirectory:
  450.     From: amr@chiton.ucsd.edu (Tony Richardson)
  451.     Subject: Programmatic control of gnuplot from UNIX
  452. rosendorf subdirectory:
  453.     From:  prf@jprix.che.wisc.edu
  454.     Subject: Multiple plots on a page
  455. vanzandt subdirectory:
  456.     From: James R. Van Zandt <jrv@mitre-bedford.ARPA>
  457.     Subject: Spline generating program
  458. white subdirectory:
  459.     From: gwhite@bionet.bio.dfo.ca
  460.     Subject: Gnuplot 3.2 for Titan 3000
  461. woo subdirectory:
  462.     From: "Alex Woo" <woo@ra-next.arc.nasa.gov>
  463.     Subject: two additional title lines and fixes to errorbar style
  464. yamamoto subdirectory:
  465.         From: "NOBORU YAMAMOTO     " <sun!kekvax.kek.jp!YAMAMOTO@pixar.com>
  466.     Subject: Re: gnuplot on Apple Macintosh, "diff -c" of version 3.0
  467.         (now includes binaries)
  468.  
  469. Q5.4: Can I do heavy - duty data processing with gnuplot?
  470.  
  471. Gnuplot alone is not suited very well for this.  One thing you might try
  472. is fudgit, an interactive multi-purpose fitting program written by
  473. Martin-D. Lacasse.  It can use gnuplot as its graphics back-end and is
  474. available from ftp.physics.mcgill.ca:/pub/Fudgit/fudgit_2.33.tar.Z
  475. [132.206.9.13], and from the main Linux server, tsx-11.mit.edu
  476. [18.172.1.2] and its numerous mirrors around the world as
  477. /pub/linux/sources/usr.bin/fudgit-2.33.tar.z.  Versions are available
  478. for AIX, Data General, HP-UX, IRIX 4, Linux, NeXT, Sun3, Sun4 and Ultrix.
  479.  
  480. You might also want to look at the applications developed by the
  481. Software Tools Group (STG) at the National Center for Supercomputing
  482. Applications.  Ftp to ftp.ncsa.uiuc.edu [141.142.20.50] and get the
  483. file README.BROCHURE for more information.
  484.  
  485. Q5.5: I have ported gnuplot to another system, or patched it.  What do I do?
  486.  
  487. If your patch is small, mail it to bug-gnuplot@dartmouth.edu, with
  488. a thorough description of what the patch is supposed to do, which version
  489. of gnuplot it is relative to, etc.  Please don't mail it to the FAQ
  490. maintainer.
  491.  
  492. If your modifications are extensive (such as a port to another system),
  493. upload your modifications to dartmouth.edu:/pub/dropoff.  Please drop a
  494. note to David.Kotz@dartmouth.edu, the maintainer of the gnuplot
  495. subdirectory there, plus a note to bug-gnuplot@dartmouth.edu.
  496.  
  497.  
  498. Section 6: Making life easier
  499.  
  500. Q6.1: How do I plot two functions in non - overlapping regions?
  501.  
  502. Use a parametric plot.  An example:
  503.  
  504. set parametric
  505. a=1
  506. b=3
  507. c=2
  508. d=4
  509. x1(t) = a+(b-a)*t
  510. x2(t) = c+(d-c)*t
  511. f1(x) = sin(x)
  512. f2(x) = x**2/8
  513. plot [t=0:1] x1(t),f1(x1(t)) title "f1", x2(t), f2(x2(t)) title "f2"
  514.  
  515. Q6.2: How do I run my data through a filter before plotting?
  516.  
  517. If your system supports the popen() - function, as UNIX does, you should
  518. be able to run the output through another process such as a short awk
  519. program (use the "help plot datafile" command for an example).
  520. Unfortunately, in 3.2, there is a rather short limitation on the maximum
  521. argument length, so your command line may be truncated (usually, this
  522. will mean that awk cannot find the filename).  Also, you may need to
  523. escape the $ - characters in your awk programs.
  524.  
  525. Version 3.4 includes the thru - keyword for the plot command for running
  526. data files through a gnuplot - defined function.
  527.  
  528. Q6.3: How do I make it easier to use gnuplot with LaTeX?
  529.  
  530. There is a set of LaTeX macros and shell scripts that are meant to
  531. make your life easier when using gnuplot with LaTeX.  This package can
  532. be found on dartmouth.edu [129.170.16.4] in pub/gnuplot/latex.shar, by
  533. David Kotz.  For example, the program "plotskel" can turn a
  534. gnuplot-output file plot.tex into a skeleton file skel.tex, that has
  535. the same size as the original plot but contains no graph.  With the
  536. right macros, the skeleton can be used for preliminary LaTeX passes,
  537. reserving the full graph for later passes, saving tremendous amounts
  538. of time.
  539.  
  540. Q6.4: How do I save and restore my settings?
  541.  
  542. Use the "save" and "load" commands for this; see "help save" and
  543. "help load" for details.
  544.  
  545.  
  546. Section 7: Known problems
  547.  
  548. Q7.1: Gnuplot is not plotting any points under X11!  How come?
  549.  
  550. Very probably, yoy still are using an old version of gnuplot_x11.
  551. Remove that, then do a full installation.
  552.  
  553. Q7.2: My isoline data generated by a FORTRAN program is not handled
  554.     correctly.  What can I do?
  555.  
  556. One known cause for this is the use of list - directed output (as in
  557. WRITE (10,*)) for generating blank lines.  FORTRAN uses ASA carriage
  558. control characters, and for list - directed output this results
  559. in a space being output before the newline.  Gnuplot does not like
  560. this.
  561.  
  562. The solution is to generate blank lines using formatted output, as in
  563. WRITE (10,'()').
  564.  
  565. Q7.3: Why does gnuplot ignore my very small numbers?
  566.  
  567. Gnuplot treats all numbers less than 1e-08 as zero, by default.  Thus,
  568. if you are trying to plot a collection of very small numbers, they may
  569. be plotted as zero.  Worse, if you're plotting on a log scale, they will
  570. be off scale.  Or, if the whole set of numbers is "zero", your range may
  571. be considered empty:
  572.  
  573. gnuplot> plot 'test1'
  574. Warning: empty y range [4.047e-19:3e-11], adjusting to [-1:1]
  575. gnuplot> set yrange [4e-19:3e-11]
  576. gnuplot> plot 'test1'
  577.                      ^
  578.          y range is less than `zero`
  579.  
  580. The solution is to change gnuplot's idea of "zero":
  581.     set zero 1e-20
  582. For more information,
  583.     help set zero
  584.  
  585.  
  586. Section 8: Credits
  587.  
  588. This list was initially compiled by John Fletcher with contributions
  589. from Russell Lang, John Campbell, David Kotz, Rob Cunningham,
  590. Daniel Lewart and Alex Woo.  Reworked by Thomas Koenig from a draft by
  591. Alex Woo, with corrections and additions from Alex Woo, John Campbell,
  592. Russell Lang, David Kotz and many corrections from Daniel Lewart.
  593. -- 
  594. Thomas Koenig, ig25@rz.uni-karlsruhe.de, ig25@dkauni2.bitnet
  595. The joy of engineering is to find a straight line on a double
  596. logarithmic diagram.
  597.